using System;

namespace MetaObjects.Contracts
{
	public interface IMetaField : IEntity
	{
		string InternalName { get; }
		string DisplayName { get; set; }
		string Description { get; set; }
		bool Required { get; set; }
		bool ReadOnly { get; set; }
		object DefaultValue { get; set; }
		Action<object, object> SetField { get; }
		Func<object, object> GetField { get; }
	}

	public interface IMetaField<TValue> : IMetaField
	{
		new TValue DefaultValue { get; set; }
		new Action<object, TValue> SetField { get; }
		new Func<object, TValue> GetField { get; }
	}

	public interface IMetaField<TEntity, TValue> : IMetaField<TValue>
	{
		new Action<TEntity, TValue> SetField { get; }
		new Func<TEntity, TValue> GetField { get; }
	}
}